package trlygjj.tanruiliyigenjinjin.mapper;

import org.apache.ibatis.annotations.Param;
import trlygjj.tanruiliyigenjinjin.domain.Employee;
import trlygjj.tanruiliyigenjinjin.query.EmployeeQueryObject;

import java.util.List;

public interface EmployeeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Employee record);

    Employee selectByPrimaryKey(Long id);

    List<Employee> selectAll();

    int updateByPrimaryKey(Employee record);

    int queryForCount(EmployeeQueryObject qo);

    List<Employee> queryForList(EmployeeQueryObject qo);

    void deleteEmployeeAndRoleRelation(Long employeeId);

    void insertEmployeeAndRoleRelation(@Param("employee_id") Long employeeId,@Param("role_id") Long roleId);

    List<Long> selectRoleByEmployeeId(Long employeeId);

    /**
     * 查询员工,根据岗位
     * @return
     */

    List<Employee>  selectUsernameByJobs(String  jobs);

    Employee queryUsername(String username);

    void changeState(Long id);

    void changeAdmin(Long id);

    void resetPassword(@Param("employeeId") Long id, @Param("username") String username);

    void updateState(Long employeeId);

    void uploadImage(@Param("hiddenImagePath") String hiddenImagePath,@Param("employeeId") Long employeeId);
}